package com.kingyun.gpsinspection.purificationservice.facade.service.som;

import com.kingyun.gpsinspection.purificationservice.facade.model.som.Comment;
import com.kingyun.gpsinspection.purificationservice.facade.model.som.Knowledge;

import java.util.List;

/**
 * 知识库service层
 * Created by liuyj on 2017/1/6.
 */
public interface SomKnowledgeService {


    /**
     * 查看知识详情  根据ID查询
     * @param knowledgeId
     * @return
     */
    Knowledge findKnowledgeById(String knowledgeId, String userId);

    /**
     * 根据输入的内容进行模糊查询 标题 内容 标签
     * @param knowledge
     * @return
     */
    List<Knowledge> findKnowledgeByCont(Knowledge knowledge);

    /**
     * 获取5个热门关键字
     * @return
     */
    List<String> findKnowledgeTag();

    /**
     * 获取知识库评论
     * @param comment
     * @return
     */
    List<Comment> getComment(Comment comment);

    /**
     * 添加评论
     * @param comment
     * @return
     */
    int addComment(Comment comment);

    /**
     * 点赞/取消点赞
     * @param knowledgeId
     * @param userId
     * @return
     */
    void praise(String knowledgeId, String userId);
}
